"""
-*- coding: utf-8 -*-
@Author  : Link
@Time    : 2022/7/6 9:29
@Site    : 
@File    : ui_variable.py
@Software: PyCharm
@Remark  : 
"""
import collections

ACTIONS_NAME = collections.namedtuple('Action', ["name", "text"])


class UiGlobalVariable:
    GRAPH_PARAMS = [
        {
            'name': "PyqtGraph绘图相关设定", 'type': 'group', 'children':
            [
                {'name': '绘图值筛选区间', 'type': 'list', 'value': 0, 'limits': {
                    "LCL-To-UCL": 0, "PassMin-To-PassMax": 1, "DataMin-To-DataMax": 2, "Average_Sigma": 3}},
                {'name': 'Average_Sigma±区间', 'type': 'int', 'value': 3, },
                {'name': '分布图柱子数量', 'type': 'int', 'value': 50, 'max': 100, 'min': 30},
                {'name': '散点趋势图抽样数', 'type': 'int', 'value': 10000},
                {'name': '绘图最大宽度', 'type': 'int', 'value': 1200},
                {'name': '绘图固定高度', 'type': 'int', 'value': 600},
            ]
        },
    ]

    GRAPH_CHART_ACTIONS = [ACTIONS_NAME("action_qt_distribution", "qt横向分布图"),
                           ACTIONS_NAME("action_qt_comparing", "qt比较密度图"),
                           ACTIONS_NAME("action_qt_scatter", "qt抽样散点图"),
                           ACTIONS_NAME("action_qt_distribution_2", "qt全局柱状图"),
                           ACTIONS_NAME("action_qt_visual_map", "Qt Visual Map")]

    SUMMARY_GROUP = ["LOT_ID", "SB_LOT_ID", "WAFER_ID", "FLOW_ID", "TEST_CODE"]
    DATA_GROUP = ["SITE_NUM", ]

    PROCESS_VALUE = ["mean", "std", "cpk"]
    PROCESS_TOP_ITEM_LIST = ["yield", "data"]
